#region MIT Licence
/*
 * Copyright (C) 2014 PdfCreative
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 
 * and associated documentation files (the "Software"), to deal in the Software without restriction, 
 * including without limitation the rights to use, copy, modify, merge, publish, distribute, 
 * sublicense, and/or sell copies of the Software, and to permit persons to whom 
 * the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included 
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 
 * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
#endregion

using System;
using System.Collections.Generic;
using System.Text;

namespace PdfCreative.Pdf.Writer.Utilities
{
    /// <summary>
    /// The FontLocation class encapsulates the paths to a font's metrics and outlines files, as well as the
    /// type of the font location (true-type or type1).
    /// </summary>
    public class FontLocation
    {
        // Private fields
        // ==============
        #region Private fields
        private string _outlinesPath;
        private string _metricsPath;
        private FontLocationType _locationType;
        #endregion



        // Public properties
        // =================
        #region Public properties
        /// <summary>
        /// Retrieves the path to the font's outlines file.
        /// </summary>
        public string OutlinesPath
        {
            get { return _outlinesPath; }
        }

        /// <summary>
        /// Retrieves the path to the font's metrics file.
        /// </summary>
        public string MetricsPath
        {
            get { return _metricsPath; }
            set { _metricsPath = value; }
        }
        
        /// <summary>
        /// Retrieves a value that indicates the type of location that the font was found at.
        /// </summary>
        public FontLocationType LocationType
        {
            get { return _locationType; }
            set { _locationType = value; }
        }
        #endregion



        // Public constructor
        // ==================
        #region Public constructor
        /// <summary>
        /// Constructs a new FontLocation instance with the specified metrics path, outline path and font location
        /// type.
        /// </summary>
        /// <param name="path">The path to both the metrics file and outlines file for the font.</param>
        /// <param name="type">The type of font location that the font was found at.</param>
        public FontLocation(string path, FontLocationType type)
            :
            this(path, path, type) { }

        /// <summary>
        /// Constructs a new FontLocation instance with the specified metrics path, outline path and font location
        /// type.
        /// </summary>
        /// <param name="metricsPath">The path to the metrics file for the font.</param>
        /// <param name="outlinesPath">The path to the outlines file for the font.</param>
        /// <param name="type">The type of font location that the font was found at.</param>
        public FontLocation(string metricsPath, string outlinesPath, FontLocationType type)
        {
            _metricsPath = metricsPath;
            _locationType = type;
            _outlinesPath = outlinesPath;
        }
        #endregion

    } // FontLocation class
}
